<div class="content">            
    <!--- Bread Crumbs Menu -->
    <div class="breadLine">
        <ul class="breadcrumb">
            <li><a href="/">Dashboard</a> <span class="divider">></span></li>                
            <li class="active">List of Brochure</li>
        </ul>
        <?php
            //echo $this->setLayout("breadcrumbs_right_menu");
            $db = new Database();
        ?>
    </div>
    <div class="row-fluid">
        <div class="span12">
            <div class="head clearfix">
                <div class="isw-calendar"></div>
                    <h1>List of Brochure</h1>
                </div>
                <div class="row-fluid">
                    
                    <div class="widget">
                        <div class="head dark">
                            <div class="icon"><span class="icos-loading"></span></div>
                            <h2>Brochures Panel</h2>                       
                        </div>                
                            <div class="block-fluid">
                                <table class="aTable tbl_brochure" cellpadding="0" cellspacing="0" width="100%">
                                    <thead>
                                        <tr>
                                            <th><input type="checkbox"></th>
                                            <th># of page</th>
                                            <th>Brochure Name</th>
                                            <th>Brochure Description</th>
                                            <th>Created By</th>
                                            <th>Status</th>
                                            <th>Date Created</th>
                                            <th>Date Modified</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php
                                            $sql = "SELECT * FROM " . $db->tbl_name(TB_BROCHURE_PAGINATION) .
                                            " bp
                                            LEFT JOIN " . $db->tbl_name(TB_USERS) . " u ON bp.user_id=u.id " .
                                            "LEFT JOIN " . $db->tbl_name(TB_ACCOUNTS) . " a ON u.id=a.user_id";
                                            
                                            $query = $db->query($sql,"array");
                                            $ret = "";
                                            
                                            foreach($query as $data){
                                            $ret .= '<tr>';
                                                $ret .= '<td><input type="checkbox"></th>';
                                                $ret .= '<td>' . $data['page_num'] . '</th>';
                                                $ret .= '<td>' . $data['brochure_name'] . '</th>';
                                                $ret .= '<td>' . $data['brochure_description'] . '</th>';
                                                $ret .= '<td>' . $data['first_name'] . " " . $data['last_name'] . '</th>';
                                                $ret .= '<td>' . $data['status'] . '</th>';
                                                $ret .= '<td>' . $data['date_created'] . '</th>';
                                                $ret .= '<td>' . $data['date_modified'] . '</th>';
                                            $ret .= '</tr>';
                                            }
                                            echo $ret;
                                        ?>
                                    </tbody>
                                </table>                    
                            </div> 
                    </div>             
                    
                    
                </div>
            </div>
        </div>
    </div>
    
    
</div>   